/**
 * @name 管理系统路由配置（因为有权限相关，所以改为动态路由方式）
 * @author sg
 * @date 2022/11/29
 * @des meta标签配置：（为什么使用isHid...原因是默认这些属性都是打开的，具体的实现需要自己根据各自的需求来实现
 *     【isHidBreadcrumb：是否隐藏面包屑】，如果有出现不需要展示面包屑的页面或者需要自定义面包屑的页面，可以配置此参数
 *     【isHidSiderBar：是否隐藏左边菜单栏，可用于二级页面的实现】如二级页面需要自定义面包屑配合【isHidBreadcrumb】实现
 *     【isHidMenuInSiderBar:是否隐藏此菜单，就是这条路由不在左侧菜单显示】此页面需要自定义面包屑配合【isHidBreadcrumb】实现
 *     【isHidWidth：是否纯净模式，页面所有margin padding 为0，初始网页模式，默认为false】
 *
 *     activeMenu: 功能全路径， 用于单个功能内部跳转到详情 ，菜单栏高亮显示哪个菜单
 *
 *   跨功能跳转demo
 *   window.location.href =
 *         window.location.origin + "/manage/view/tcc/sqfz/haha/pageE";
 *
 * */
export const asyncRouterMap = [
  {
    name: "layout",
    path: "/sqfz",
    component: () =>
      import(
        /* webpackChunkName: "sqfz-layout" */ "../pages/index/views/layout/index.vue"
      ),
    children: [
      {
        name: "首页",
        path: "home",
        fullPath: "/sqfz/home",
        component: () =>
          import(
            /* webpackChunkName: "sqfz-home" */ "../pages/index/views/home/index"
          ),
        meta: {
          iconName: "home",
          requireAuth: false, // 是否需要登录验证
        },
      },
      {
        name: "功能B",
        path: "pageB",
        fullPath: "/sqfz/pageB",
        component: () =>
          import(
            /* webpackChunkName: "package-list" */ "../pages/index/views/pageB/index.vue"
          ),
        meta: {
          isHidBreadcrumb: true,
          requireAuth: false, // 是否需要登录验证
          isHidSiderBar: false,
          isHidWidth: false,

          // isHidSiderBar: true,
        },
      },
      {
        path: "/custom",
        name: "custom",
        fullPath: "/sqfz/haha/pageD/custom",
        component: () => import("../pages/index/views/custom/index.vue"),
        meta: {
          isHidMenuInSiderBar: true,
          isHidSiderBar: false,
          isHidBreadcrumb: false,
          activeMenu: "/sqfz/pageB",
        },
      },

      {
        name: "功能集2",
        path: "jrfw",
        redirect: "noredirect",
        component: () =>
          import(
            /* webpackChunkName: "package-list" */ "../pages/index/views/temp/index.vue"
          ),
        meta: {},
        children: [
          {
            name: "功能A",
            path: "pageA",
            fullPath: "/sqfz/jrfw/pageA",
            component: () =>
              import(
                /* webpackChunkName: "package-list" */ "../pages/index/views/pageA/index.vue"
              ),
            meta: {
              isHidBreadcrumb: false,
              requireAuth: false, // 是否需要登录验证
            },
          },
          {
            path: "/detailA",
            name: "detailA",
            fullPath: "/sqfz/haha/detailA",
            meta: {
              requireAuth: false, // 是否需要登录验证
              isHidMenuInSiderBar: true, // 详情在菜单中不显示
              isHidSiderBar: false,
              isHidBreadcrumb: true, // 详情由于面包屑展示有问题，所以需要自定义
              activeMenu: "/sqfz/jrfw/pageA",
              isHidWidth: true,
            },
            component: () =>
              import(
                /* webpackChunkName: "sqfz-home" */ "../pages/index/views/pageA/detailA.vue"
              ),
          },
          {
            name: "功能C",
            path: "pageC",
            fullPath: "/sqfz/jrfw/pageC",
            component: () =>
              import(
                /* webpackChunkName: "package-list" */ "../pages/index/views/pageC/index.vue"
              ),
            meta: {
              isHidBreadcrumb: false,
              requireAuth: false, // 是否需要登录验证
            },
          },
          {
            path: "/detailC",
            name: "detailC",
            fullPath: "/sqfz/haha/detailC",
            meta: {
              requireAuth: false, // 是否需要登录验证
              isHidMenuInSiderBar: true, // 详情在菜单中不显示
              isHidSiderBar: true,
              isHidBreadcrumb: false, //
              activeMenu: "/sqfz/jrfw/pageC",
              isHidWidth: false,
            },
            component: () =>
              import(
                /* webpackChunkName: "sqfz-home" */ "../pages/index/views/pageA/detailA.vue"
              ),
          },
        ],
      },

      {
        name: "功能集3",
        path: "haha",
        redirect: "noredirect",
        component: () =>
          import(
            /* webpackChunkName: "package-list" */ "../pages/index/views/temp/index.vue"
          ),
        meta: {},
        children: [
          {
            name: "功能D",
            path: "pageD",
            fullPath: "/sqfz/haha/pageD",
            component: () =>
              import(
                /* webpackChunkName: "package-list" */ "../pages/index/views/pageD/index.vue"
              ),
            meta: {
              isHidBreadcrumb: false,
              requireAuth: false, // 是否需要登录验证
            },
          },
          {
            name: "功能E",
            path: "pageE",
            fullPath: "/sqfz/haha/pageE",
            component: () =>
              import(
                /* webpackChunkName: "package-list" */ "../pages/index/views/pageE/index.vue"
              ),
            meta: {
              isHidBreadcrumb: false,
              requireAuth: false, // 是否需要登录验证
            },
          },
        ],
      },
    ],
  },
];
